import request from '@/dvadmin/request/index.js'

/**
 * 短信发送
 * @param {Object} data
 */
export function sendSms(data) {
    return request({
        url: '/api/sms/send_login_sms/',
        method: 'post',
        data: data,
        custom: {
            auth: false
        }
    })
}

/**
 * 获取验证码
 */
export function getCaptcha() {
    return request({
        url: '/api/captcha/',
        method: 'get',
        custom: {
            auth: false
        }
    })
}

/**
 * 账号密码登录
 * @param {Object} data
 */
export function pwdLogin(data) {
    return request({
        url: '/api/login/',
        method: 'post',
        data: data,
        custom: {
            noBack: true,
            auth: false
        }
    })
}
